<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
	margin-left: 3px;
	margin-top: 0px;
	margin-right: 3px;
	margin-bottom: 0px;
}
.STYLE1 {
	color: #e1e2e3;
	font-size: 12px;
}
.STYLE6 {color: #000000; font-size: 12; }
.STYLE10 {color: #000000; font-size: 12px; }
.STYLE19 {
	color: #344b50;
	font-size: 12px;
}
.STYLE21 {
	font-size: 12px;
	color: #3b6375;
}
.STYLE22 {
	font-size: 12px;
	color: #295568;
}
-->
</style>
<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
<script src="js/client_validate.js"></script>
<script type="text/javascript">

function check(){
	var username=document.getElementById("bbsUserInfousername");
	if(trim(username.value)==""){
		document.getElementById("b_username").innerHTML="<font color='red'>用户名不能为空</font>"
		username.focus();
		return false;
	}else{
		document.getElementById("b_username").innerHTML="";
	}
	
	var password=document.getElementById("bbsUserInfopassword")
	if(trim(password.value)==""){
		document.getElementById("b_password").innerHTML="<font color='red'>密码不能为空</font>"
		password.focus();
		return false;
	}else{
		document.getElementById("b_password").innerHTML="";
	}
	
	var repassword=document.getElementById("checkpassword");
	if(trim(password.value)!=trim(repassword.value)){
		document.getElementById("b_cpassword").innerHTML="<font color='red'>密码不一样</font>"
		repassword.focus();
		return false;
	}else{
		document.getElementById("b_cpassword").innerHTML=""
	}
	
	var emailtmp=document.getElementById("email");
	if(trim(emailtmp.value)!=trim(emailtmp.value)){
		document.getElementById("b_email").innerHTML="<font color='red'>邮箱不能为空一样</font>"
		repassword.focus();
		return false;
	}else{
		document.getElementById("b_email").innerHTML=""
	}
	/*
	var email=document.getElementById("email");
	var zeEmail=new RegExp(/[\\w[._]]+@[\\w[._]]+\\.\\w+/);
	if(!zeEmail.test(trim(emial.value){
		document.getElementById("b_email").innerHTML="<font color='red'>邮件格式不对</font>"
		emali.focus();
		return false;
	}
*/
}		
</script>
</head>

<body>
<form action="bbsUserInfo_addInfo.do" method="post"  onsubmit="return check()" >
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
	    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td height="24" bgcolor="#353c44"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	          <tr>
	            <td>
	            <table width="100%" border="0" cellspacing="0" cellpadding="0">
	              <tr>
	                <td width="6%" height="19" valign="bottom"><div align="center"><img src="images/tb.gif" width="14" height="14" /></div></td>
	                <td width="94%" valign="bottom"><span class="STYLE1"> 编辑用户信息</span></td>
	              </tr>
	            </table></td>
	           
	          </tr>
	        </table></td>
	      </tr>
	    </table></td>
	  </tr>
	  
	  <tr>
		    <td>
			    <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#a8c7ce">
			      <tr>
			        <td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户名</span></div></td>
			        <td  width="80%" height="" bgcolor="#FFFFFF" class="STYLE6" >
			        	<input type="text"  name="bbsUserInfo.username" id="bbsUserInfousername" style="width: 50%;"/><span id="b_username"></span>
			        </td>
			      </tr>
			      <tr>
			        <td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户密码</span></div></td>
			        <td  width="80%" height="" bgcolor="#FFFFFF" class="STYLE6" >
			        	<input type="text"  name="bbsUserInfo.password" id="bbsUserInfopassword" style="width: 50%;"/><span id="b_password"></span>
			        </td>
			      </tr>
			       <tr>
			        <td width="20%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">确认密码</span></div></td>
			        <td  width="80%" height="" bgcolor="#FFFFFF" class="STYLE6" >
			        	<input type="text"  style="width: 50%;" id="checkpassword"/><span id="b_cpassword"></span>
			        </td>
			      </tr>
			      <tr>
			        <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户邮箱</span></div></td>
			        <td height="20" bgcolor="#FFFFFF" class="STYLE19">
			        	<input type="text"  name="bbsUserInfo.email" id="email" style="width: 50%;" id="bbsUserInfoemail"/><span id="b_email"></span>
			        </td>
			      </tr>
				<tr>
					 <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户性别</span></div></td>
						 <td height="20" bgcolor="#FFFFFF" class="STYLE19">
							<s:select list="#{100:'请选择',0:'男',1:'女'}" value="100"  theme="simple" id="userSex" name="bbsUserInfo.userSex"/>
							
						 </td>
				</tr>
				<tr>	
						 <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户级别</span></div></td>
						 <td height="20" bgcolor="#FFFFFF" class="STYLE19">
						 
						<s:select list="#{100:'请选择',1:'初级会员',2:'中级会员',3:'高级会员',4:'版主',5:'系统管理员'}" value="100"  theme="simple" id="userLevel" name="bbsUserInfo.userLevel"/>
						 
						 </td>
				</tr>
				<tr>
						<td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户状态</span></div></td>
						 <td height="20" bgcolor="#FFFFFF" class="STYLE19">
						 	<s:select list="#{100:'请选择',0:'锁定',1:'未锁定'}"  value="100"  theme="simple" id="userState" name="bbsUserInfo.userState"/>
						 </td>
				</tr>
				
				<tr>
						 <td width="15%" height="20" bgcolor="d3eaef" class="STYLE6"><div align="center"><span class="STYLE10">用户积分</div></td>
						 <td height="20" bgcolor="#FFFFFF" class="STYLE19">
						 	<input type="text"  name="bbsUserInfo.userIntergral" id="userIntergral" style="width: 50%;"/>
						 </td>
				</tr>
				<tr>
					<td colspan="2" bgcolor="#FFFFFF" height="20"><div align="center"><input type="submit" ></input> &nbsp&nbsp&nbsp<input type="reset"></input></div></td>
				</tr>
			    </table>
		   </td>
	  </tr>
	</table>
   </td>
  </tr>
</table>
</form>
</body>
</html>